package com.liuyucheng.idea_springboot.mongodb.dao;

import com.liuyucheng.idea_springboot.mongodb.bean.Comment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

public interface CommentRepository extends MongoRepository<Comment,String> {
    //方法的命名要严格按照规范，parentid是字段的名称
    Page<Comment> findByParentid(String parentid, Pageable pageable);

}
